<?php $this->load->view('_inc/header')?>
<script>
    $(document).ready(function(){
        $('#isemestre').mask('9º/9999')
        $('#ihora').mask('99:99h')
    });
</script>

<h1>Nova Turma</h1>
<?php echo form_open('turma/cadastrando'); ?>
<table>
    <tr><td><?php echo form_label('Letra:','iletra'); echo form_input('letra','','id="iletra" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Professor:','iprof'); echo form_dropdown('professor',$professores,'','id="iprof" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Disciplina:','idisc'); echo form_dropdown('disciplina',$disciplinas,'','id="idisc" class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Semestre:','isemestre'); echo form_input('semestre','','id="isemestre" autofocus class=required'); ?></td></tr>
    <tr><td><?php echo form_label('Horário:','ihora'); echo form_input('horario','','id="ihora" class=required'); ?></td></tr>
    <tr>
        <td>
        <?php echo form_label('Dias:');?>
            <?php echo form_checkbox('dias[]','Segunda','');?>Seg
            <?php echo form_checkbox('dias[]','Terça','');?>Ter
            <?php echo form_checkbox('dias[]','Quarta','');?>Qua
            <?php echo form_checkbox('dias[]','Quinta','');?>Qui
            <?php echo form_checkbox('dias[]','Sexta','');?>Sex
            <?php echo form_checkbox('dias[]','Sábado','');?>Sáb
        </td>
    </tr>
    <tr>
        <td>
            <br><br>
            <h2>Seleção de Alunos</h2>
            <div class="selecaoAlunos">
                <?php foreach($alunos as $aluno){?>
                    <div>
                        <?php echo form_checkbox('alunos[]',$aluno->id,'')?>
                        <img src="<?php echo base_url()?>public/fotos/<?php echo $aluno->id?>.jpg" height="40" width="40"/>
                        <?php echo $aluno->nome?>
                    </div>
                <?php }?>
            </div>
        </td>
    </tr>
    <tr>
        <td>
            <?php echo form_submit('','Salvar') ?>
            <?php echo form_button('','Cancelar', 'class=cancela')?>
        </td>
    </tr>
</table>
<?php echo form_close(); ?>
<?php $this->load->view('_inc/footer')?>